from django.db import models

# Create your models here.
class Accounts(models.Model):
    A_name = models.CharField(max_length=50,null=False)
    A_pwd = models.CharField(max_length=50,null=False)
    A_salesman = models.CharField(max_length=50,null=False)
    A_remark = models.CharField(max_length=200,null=True)


class Clients(models.Model):
    C_name = models.CharField(max_length=20, null=False)
    C_phone = models.CharField(max_length=20, null=False)
    C_createtime = models.DateField(null=False,auto_now=True)
    A_id = models.ForeignKey('Accounts',on_delete=models.CASCADE,null=True)
    S_id = models.ForeignKey('Sources',on_delete=models.CASCADE,null=True)




class Sources(models.Model):
    S_name = models.CharField(max_length=20,null=False)


